1. Field of the Invention
The invention is in the field of computer graphics, and more particularly to processing program instructions in a multi-pass graphics pipeline.
2. Description of the Related Art
Current multi-pass data processing methods are exemplified by systems and methods developed for computer graphics. This specialized field includes technology wherein data is processed through a multi-pass pipeline in which each pass typically performs a specific sequence of operations on the data and uses the output of one pass during processing of a subsequent pass. At the end of a first pass the output data is written to memory (local or host). During a subsequent pass the output data from the first pass is read from memory and processed.
Recent advances in graphics processors permit users to program graphics pipeline units using microcoded programs called pixel or shader programs to implement a variety of user defined shading algorithms. Although these graphics processors are able to execute shader programs, the program instructions that the graphics processors are capable of executing do not include loop and branch instructions. As a result, shader programs that repeat instructions, e.g., loop on different sets of data, must include instructions for each loop explicitly. For example, a loop comprised of ten instructions, where the loop is executed five times becomes fifty program instructions without a loop instruction compared with eleven instructions (ten plus the loop instruction) with a loop instruction. Longer shader programs require more storage resources (host or local memory) and require more bandwidth to download from a host memory system to a local graphics memory.
For the foregoing reasons, there is a need for a graphics system that supports the execution of loop instructions.